package ch.usi.inf.pf2.node;

import ch.usi.inf.pf2.cell.NumericValue;
import ch.usi.inf.pf2.node.Constant;
import junit.framework.TestCase;


/**
 * A DivisionTest ,it tests if Division class works or not.
 * 
 * @author Elham.menzer@gmail.com
 */

public class DivisionTest extends TestCase {

	public void testCompute(){
		//(80/4)/5
		Node n =new Division(
				new Division(
						new Constant (80),
						new Constant (4)
						),
						new Constant(5)),
		Value; NumericValue v =(NumericValue) n.evaluate();
		assertEquals(4.0,((NumericValue)v).get());
						
	}
		

}


